﻿Imports System

Namespace System.Workflow.Runtime
    <Serializable> _
    Public Class TimerEventSubscription
        ' Methods
        Protected Sub New()
        End Sub

        Public Sub New(ByVal workflowInstanceId As Guid, ByVal expiresAt As DateTime)
            Me.New(Guid.NewGuid, workflowInstanceId, expiresAt)
        End Sub

        Public Sub New(ByVal timerId As Guid, ByVal workflowInstanceId As Guid, ByVal expiresAt As DateTime)
            Me.queueName = timerId
            Me.workflowInstanceId = workflowInstanceId
            Me.subscriptionId = timerId
            Me.expiresAt = expiresAt
        End Sub


        ' Properties
        Public Overridable ReadOnly Property ExpiresAt As DateTime
            Get
                Return Me.expiresAt
            End Get
        End Property

        Property QueueName As IComparable
            Public Overridable Get
                Return Me.queueName
            End Get
            Protected Overridable Set(ByVal value As IComparable)
                Me.queueName = value
            End Set
        End Property

        Public Overridable ReadOnly Property SubscriptionId As Guid
            Get
                Return Me.subscriptionId
            End Get
        End Property

        Public Overridable ReadOnly Property WorkflowInstanceId As Guid
            Get
                Return Me.workflowInstanceId
            End Get
        End Property


        ' Fields
        Private expiresAt As DateTime
        Private queueName As IComparable
        Private subscriptionId As Guid
        Private workflowInstanceId As Guid
    End Class
End Namespace

